﻿<%@ Page Title="" Language="C#" MasterPageFile="~/admin/Admin.Master" AutoEventWireup="true"
    CodeBehind="productList.aspx.cs" Inherits="PHTShop.admin.productList" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="title" class="b2">
        <p>
        </p>
        <h2>
            Product List</h2>
    </div>
    <p>
    </p>
    <div class="listActions">
        <label for="actionSelect">
            Choose language:
        </label>
        <asp:DropDownList ID="DropDownList1" runat="server" CssClass="select" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged"
            AutoPostBack="True">
        </asp:DropDownList>
    </div>
    <p>
    </p>
    <asp:ListView ID="ListView1" runat="server" OnPagePropertiesChanging="ListView1_PagePropertiesChanging">
        <LayoutTemplate>
            <table cellspacing="0" id="postList" class="listTable">
                <!-- Thead -->
                <thead>
                    <tr>
                        <th class="header">
                            <a title="Post" href="#">Product name</a>
                        </th>
                        <th class="header">
                            <a title="Post" href="#">Price name</a>
                        </th>
                          <th class="header">
                            <a title="Post" href="#">Quantity</a>
                        </th>
                        <th class="header">
                            <a title="Post" href="#">Category name</a>
                        </th>
                           <th class="header">
                            <a title="Post" href="#">Status</a>
                        </th>
                        <th class="header">
                            <a title="Author" href="#">Action</a>
                        </th>
                    </tr>
                </thead>
                <tbody>
                    <asp:PlaceHolder ID="itemPlaceholder" runat="server"></asp:PlaceHolder>
                </tbody>
            </table>
        </LayoutTemplate>
        <ItemTemplate>
            <tr>
                <td>
                    <a title="Lorem Ipsum">
                        <%# Eval("productname")%></a>
                </td>
                <td>
                   
                        <%# Eval("price")%>
                </td>
                 <td>
                   
                        <%# Eval("quantity")%>
                </td>
                <td>
                    <a href='<%# "productList.aspx?categoryID="+ Eval("catID") %>' title='<%# Eval("categoryname")%>'>
                        <%# Eval("categoryname")%></a>
                </td>
                 <td>
                    <a title="Lorem Ipsum">
                        <asp:CheckBox Enabled="false" Checked='<%# Eval("status")%>' ID="CheckBox1" runat="server" />
                      </a>
                </td>
                <td>
                    <asp:HiddenField ID="HiddenField1" Value='<%# Eval("productId") %>' runat="server" />
                    <asp:LinkButton ID="LinkButton1" OnClick="LinkButton1_Click" ForeColor="BlueViolet"
                        OnClientClick="return confirm('Are you sure')" runat="server">Delete</asp:LinkButton>
                    |
                    <asp:HyperLink ForeColor="BlueViolet" NavigateUrl='<%# "editProduct.aspx?id="+Eval("productId") %>'
                        ID="HyperLink1" runat="server">Edit</asp:HyperLink>
                </td>
            </tr>
        </ItemTemplate>
    </asp:ListView>
   
    <div class="inner">
        <div class="paginate">
            <asp:DataPager ID="DataPager1" runat="server" PagedControlID="ListView1" PageSize="10">
                <Fields>
                    <asp:NextPreviousPagerField ShowFirstPageButton="true" ShowPreviousPageButton="true"
                        ButtonType="Link" ShowNextPageButton="false" ShowLastPageButton="false" />
                    <asp:NumericPagerField ButtonType="Link" />
                    <asp:NextPreviousPagerField ShowFirstPageButton="false" ButtonType="Link" ShowPreviousPageButton="false"
                        ShowNextPageButton="true" ShowLastPageButton="true" />
                </Fields>
            </asp:DataPager>
        </div>
    </div>
    <p>
    </p>
</asp:Content>
